package com.as.server.entity;

import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName follow
 */
@Data
public class Follow implements Serializable {
    /**
     * 
     */
    private Long fid;

    /**
     * 
     */
    private Long uidto;

    /**
     * 
     */
    private Long uidfollow;

    private User user;

    private String name;

    private String headimg;

    public Long getFid() {
        return fid;
    }

    public void setFid(Long fid) {
        this.fid = fid;
    }

    public Long getUidto() {
        return uidto;
    }

    public void setUidto(Long uidto) {
        this.uidto = uidto;
    }

    public Long getUidfollow() {
        return uidfollow;
    }

    public void setUidfollow(Long uidfollow) {
        this.uidfollow = uidfollow;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public String getHeadimg() {
        return headimg;
    }

    public void setHeadimg(String headimg) {
        this.headimg = headimg;
    }

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Follow other = (Follow) that;
        return (this.getFid() == null ? other.getFid() == null : this.getFid().equals(other.getFid()))
            && (this.getUidto() == null ? other.getUidto() == null : this.getUidto().equals(other.getUidto()))
            && (this.getUidfollow() == null ? other.getUidfollow() == null : this.getUidfollow().equals(other.getUidfollow()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getHeadimg() == null ? other.getHeadimg() == null : this.getHeadimg().equals(other.getHeadimg()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getFid() == null) ? 0 : getFid().hashCode());
        result = prime * result + ((getUidto() == null) ? 0 : getUidto().hashCode());
        result = prime * result + ((getUidfollow() == null) ? 0 : getUidfollow().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getHeadimg() == null) ? 0 : getHeadimg().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", fid=").append(fid);
        sb.append(", uidto=").append(uidto);
        sb.append(", uidfollow=").append(uidfollow);
        sb.append(", name=").append(name);
        sb.append(", headimg=").append(headimg);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}